﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpLocatorCommands.h"
#include "Vector3d.h"
#include "ElementId.h"

namespace gcmp
{
    class IActionLocatorBehavior;

    /// \brief 配置罗盘面移动 Action 的生成器 IActionCreator 的参数
    class GCMP_LOCATOR_COMMANDS_EXPORT ActionLocatorPlanarInput
    {
    public:
        /// \brief 构造函数
        /// \param opActionBehavior 罗盘面移动Action的Behavior，用于配置罗盘面移动操作行为
        /// \param handleId         罗盘面移动轴Id
        /// \param startPoint       面移动操作起点
        /// \param bIsPlanarMoveLocatorOnly     是否仅面移动罗盘
        ActionLocatorPlanarInput(OwnerPtr<gcmp::IActionLocatorBehavior> opActionBehavior, ElementId  handleId, const Vector3d& startPoint, bool bIsPlanarMoveLocatorOnly = false);

        /// \brief 析构函数
        ~ActionLocatorPlanarInput();

        /// \brief 获取罗盘面移动Action的Behavior
        /// \return 罗盘面移动Action的Behavior指针
        OwnerPtr<IActionLocatorBehavior> GetLocatorPlanarMoveBehavior();

        /// \brief 是否仅面移动罗盘
        /// \return Y:true , N:false
        bool IsOnlyPlanarMoveLocator()
        {
            return m_bIsPanarMoveLocatorOnly;
        }

        /// \brief 获取罗盘面移动轴Id
        /// \return 轴线Id
        ElementId GetPlanarMoveHandleId()
        {
            return m_handleId;
        }

        /// \brief 获取罗盘面移动起点
        /// \return 罗盘面移动起点
        const Vector3d& GetPlanarMoveStartPoint()
        {
            return m_startPoint;
        }

    private:
        OwnerPtr<gcmp::IActionLocatorBehavior> m_opActionBehavior;
        bool m_bIsPanarMoveLocatorOnly;
        ElementId  m_handleId;
        Vector3d   m_startPoint;
    };
}


